TmCore

Section: C Library Functions (3)
Updated: 24 July 1993
Index Return to Main Contents
 

NAME

TmCore - the Core widget class  

SYNOPSIS

No command exists to create this widget - it is for inheritance purposes only.
 

DESCRIPTION

This is the tcl binding to the Xt Core widget.  

RESOURCES

The new resources are
background
backgroundPixmap
borderColor
borderPixmap
borderWidth
destroyCallback
height
mappedWhenManaged
sensitive
width
x
y

background
The value for this resource is the name of a color.
height
The value for this resource is an integer number of pixels.
sensitive
The values for this resource are

true
false
 

METHODS

The methods supported for this widget and all its descendants are
getValues
setValues
manageChild
unmanageChild
beep
getGC
callActionProc
defineCursor
destroyWidget
displayInfo
dragStart
dropSiteRegister
getAppResources
getSelectionValue
isComposite
isConstraint
isManaged
isMapped
isSensitive
isShell
lowerWindow
mapWidget
processTraversal
raiseWindow
realizeWidget
removeCallback
resources
setCommand
setSensistive
unmapWidget
windowId
augmentTranslations
overrideTranslations
uninstallTranslations
warpPointer

getValues -resource vbl ...
getValues takes a list of resource/variable pairs and stores the value of each resource in the corresponding variable.

setValues -resource value ...
setValues takes a list of resource/value pairs and sets each resource to the corresponding value.

manageChild
This manages the child and brings it under the geometry management of the parent.

unmanageChild
This removes the child from the geometry management of the parent.
getGC [-background bg] [-foreground fg] [-font font]
This method creates a graphics context with the specified foreground, background and font values, and returns an XID that can be used in drawing commands requiring a graphics context.

callActionProc action [options]
This calls the widget action specified. The action must be in the form it would appear in an action table, The event included given to the action is by default of type ClientMessage. Options include
-type ButtonRelease | ButtonPress | KeyRelease | KeyPress
This sets the event type.

-x x
This sets the x value in the event.
-y y
This sets the y value in the event.

-keysysm keysym
This sets the keysym for a KeyRelease or KeyPress event. A keysym is the Xt abstraction for keys.
For example the arrow widget has an action Activate() which requires x and y values of the pointer:
      callActionproc Activate() -type ButtonPress -x 0 -y 0

defineCursor cursor
This sets the cursor for a widget. Possible values are the X Font Cursors with the leading XC_ omitted. Note that it is an error to attempt to set a cursor on a widget that has not been realized. For example,
      sets the coffe mug cursor. A null cursor value of "" resets the cursor for the window to the default.

destroyWidget
The destroys the widget and the tcl command associated to it. Note that destruction of widgets is a 2-phase process, and the widget may not actually be destroyed till later. The command is deleted immediately. This may result in inconsistent state between Xt and tcl, where the widget still exists but there is no tcl command for it anymore. The alternative of deleting the command only when the widget is destroyed is no better because then there is no way of knowing when the command has been deleted.

displayInfo
This returns a list of {display name, display width (pixels), display height (pixels), display width (mm), display height (mm), default screen, default depth, default root window}

dragStart
This is used in drag and drop. See TmDrag.man.

dropSiteRegister
This is used in drag and drop. See TmDrag.man.

getAppResources resources
This extracts the application resources as set in the resource database. The resources argument is a list of resource sets. Each one consists of the resource name, its class, the default value and the name of a tcl variable to store the value in. For example,
{
    {helpFile HelpFile "" tcl_helpFile }
    {showHelp ShowHelp 0 tcl_show}
}

getSelectionValue selection command
getSelectionValue attempts to get the selection selection which can be e.g. ``PRIMARY'', ``CLIPBOARD'' If it succeeds, it executes the tcl command. Before executing the command it will substitute any string %selection with the value of the selection.

mapWidget
This maps the widget, causing it to become visible if unmapped.

processTraversal direction
This sets the widget that receives the next keyboard events. The possible values are
current
down
home
left
next
next_tab_group
prev
prev_tab_group
right
up

removeCallback callback command
Removes the callback that matches the callback and the tcl command.

realizeWidget
This realizes the widget and all its children, which creates windows for the widget and its children. Generally this would only be used on `.', but may be used on other widgets if it is neccessary that they have an X window.

resources
This returns a list of resources that the widget has. Each element of the list consists of a list of five values: the resource name as used in get/setValues, the resource name as used in resource files, the resource class as used in resource files, the resource type as known to Motif and the resource value. in cases where the resource value makes no sense (as in a C pointer), it is replaced by an empty string.

setCommand [command arguments]
This sets the command and arguments used to invoke the application, and may be used by an X11R5 session manager. With no arguments, the command line of the application at startup time is used. This method should only be used on toplevel shells, typically `.'. This command is obsolete for X11R6, where session manager resources should be used.

setSensitive true | false
Sets the sensitivity of the widget to input events to either true or false.

unmapWidget
This unmaps the widget, removing it from the display. It does not remove it from the geometry management of the parent.

augmentTranslations translations
overrideTranslations translations
uninstallTranslations
Manipulate the translations for a widget.

 

CALLBACK SUBSTITUTIONS

The callback substitutions for %x and %y (the x and y coordinates of the event) are supported for those events for which these fields are meaningfull (ButtonEvent, KeyEvent, MotionEvent).

 

BUGS

None known.  

AUTHOR

Jan Newmarch, University of Canberra


 

Index

NAME
SYNOPSIS
DESCRIPTION
RESOURCES
METHODS
CALLBACK SUBSTITUTIONS
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 20:43:53 GMT, June 11, 2022